import axiosInstance from './request'

export function getBanners(): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/banner'
  })
}

export function getHotPlaylist(limit: number, offset: number): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/top/playlist',
    params: {
      limit: limit,
      offset: offset
    }
  })
}

export function getNewAlbum(): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/album/newest'
  })
}

export function getRanks(): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/toplist/detail'
  })
}

export function getRanksDetails(id: number): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/playlist/detail',
    params: {
      id
    }
  })
}

export function getPartSingers(limit = 5): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/top/artists',
    params: {
      limit
    }
  })
}

export function getHotestAnchor(limit = 5): any {
  return axiosInstance.request({
    method: 'GET',
    url: '/dj/toplist/popular',
    params: {
      limit
    }
  })
}
